|
uarti2cspi2 2.2.0
|
List of registers of UART I2C SPI 2 Click driver. More...
Topics | |
| UART I2C SPI 2 Registers Settings | |
| Settings for registers of UART I2C SPI 2 Click driver. | |
| UART I2C SPI 2 MikroBUS Map | |
| MikroBUS pin mapping of UART I2C SPI 2 Click driver. | |
| Uarti2cspi2_reg | |
Functions | |
| void | uarti2cspi2_cfg_setup (uarti2cspi2_cfg_t *cfg) |
| UART I2C SPI 2 configuration object setup function. | |
| void | uarti2cspi2_drv_interface_sel (uarti2cspi2_cfg_t *cfg, uarti2cspi2_drv_t drv_sel) |
| UART I2C SPI 2 driver interface setup function. | |
| err_t | uarti2cspi2_init (uarti2cspi2_t *ctx, uarti2cspi2_cfg_t *cfg) |
| UART I2C SPI 2 initialization function. | |
| err_t | uarti2cspi2_default_cfg (uarti2cspi2_t *ctx) |
| UART I2C SPI 2 default configuration function. | |
| err_t | uarti2cspi2_write_regs (uarti2cspi2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| UART I2C SPI 2 write registers function. | |
| err_t | uarti2cspi2_read_regs (uarti2cspi2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| UART I2C SPI 2 read registers function. | |
| err_t | uarti2cspi2_write_reg (uarti2cspi2_t *ctx, uint8_t reg, uint8_t data_in) |
| UART I2C SPI 2 write register function. | |
| err_t | uarti2cspi2_read_reg (uarti2cspi2_t *ctx, uint8_t reg, uint8_t *data_out) |
| UART I2C SPI 2 read register function. | |
| err_t | uarti2cspi2_check_com (uarti2cspi2_t *ctx) |
| UART I2C SPI 2 communication check function. | |
| void | uarti2cspi2_enable_device (uarti2cspi2_t *ctx) |
| UART I2C SPI 2 enable device function. | |
| void | uarti2cspi2_disable_device (uarti2cspi2_t *ctx) |
| UART I2C SPI 2 disable device function. | |
| uint8_t | uarti2cspi2_get_int_pin (uarti2cspi2_t *ctx) |
| UART I2C SPI 2 get INT pin function. | |
| void | uarti2cspi2_select_uart_0 (uarti2cspi2_t *ctx) |
| UART I2C SPI 2 select UART 0 function. | |
| void | uarti2cspi2_select_uart_1 (uarti2cspi2_t *ctx) |
| UART I2C SPI 2 select UART 1 function. | |
| err_t | uarti2cspi2_set_baud_rate (uarti2cspi2_t *ctx, uint32_t baud_rate, uint32_t *act_baud_rate) |
| UART I2C SPI 2 set baud rate function. | |
| err_t | uarti2cspi2_write_data (uarti2cspi2_t *ctx, uint8_t *data_in, uint8_t len) |
| UART I2C SPI 2 write data function. | |
| err_t | uarti2cspi2_read_data (uarti2cspi2_t *ctx, uint8_t *data_out, uint8_t len) |
| UART I2C SPI 2 read data function. | |
List of registers of UART I2C SPI 2 Click driver.
API for configuring and manipulating UART I2C SPI 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void uarti2cspi2_cfg_setup | ( | uarti2cspi2_cfg_t * | cfg | ) |
UART I2C SPI 2 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See uarti2cspi2_cfg_t object definition for detailed explanation. |
| err_t uarti2cspi2_check_com | ( | uarti2cspi2_t * | ctx | ) |
UART I2C SPI 2 communication check function.
This function checks communication by reading the revision ID and validating its major revision.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uarti2cspi2_default_cfg | ( | uarti2cspi2_t * | ctx | ) |
UART I2C SPI 2 default configuration function.
This function executes a default configuration of UART I2C SPI 2 Click board.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void uarti2cspi2_disable_device | ( | uarti2cspi2_t * | ctx | ) |
UART I2C SPI 2 disable device function.
This function disables the device by setting the RST pin low.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| void uarti2cspi2_drv_interface_sel | ( | uarti2cspi2_cfg_t * | cfg, |
| uarti2cspi2_drv_t | drv_sel ) |
UART I2C SPI 2 driver interface setup function.
This function sets a serial driver interface which will be used further in the Click driver.
| [out] | cfg | : Click configuration structure. See uarti2cspi2_cfg_t object definition for detailed explanation. |
| [in] | drv_sel | : Driver interface selection. See uarti2cspi2_drv_t object definition for detailed explanation. |
| void uarti2cspi2_enable_device | ( | uarti2cspi2_t * | ctx | ) |
UART I2C SPI 2 enable device function.
This function enables the device by setting the RST pin high.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| uint8_t uarti2cspi2_get_int_pin | ( | uarti2cspi2_t * | ctx | ) |
UART I2C SPI 2 get INT pin function.
This function reads the state of the INT pin.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| err_t uarti2cspi2_init | ( | uarti2cspi2_t * | ctx, |
| uarti2cspi2_cfg_t * | cfg ) |
UART I2C SPI 2 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See uarti2cspi2_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uarti2cspi2_read_data | ( | uarti2cspi2_t * | ctx, |
| uint8_t * | data_out, | ||
| uint8_t | len ) |
UART I2C SPI 2 read data function.
This function reads a block of data from the receive buffer.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uarti2cspi2_read_reg | ( | uarti2cspi2_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
UART I2C SPI 2 read register function.
This function reads a single byte of data from the selected register address.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Output read data. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uarti2cspi2_read_regs | ( | uarti2cspi2_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
UART I2C SPI 2 read registers function.
This function reads a desired number of data bytes starting from the selected register address.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void uarti2cspi2_select_uart_0 | ( | uarti2cspi2_t * | ctx | ) |
UART I2C SPI 2 select UART 0 function.
This function selects UART 0 as the active UART channel.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| void uarti2cspi2_select_uart_1 | ( | uarti2cspi2_t * | ctx | ) |
UART I2C SPI 2 select UART 1 function.
This function selects UART 1 as the active UART channel.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| err_t uarti2cspi2_set_baud_rate | ( | uarti2cspi2_t * | ctx, |
| uint32_t | baud_rate, | ||
| uint32_t * | act_baud_rate ) |
UART I2C SPI 2 set baud rate function.
This function sets the baud rate for the active UART channel.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [in] | baud_rate | : Desired baud rate. |
| [out] | act_baud_rate | : Actual baud rate set by the device. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uarti2cspi2_write_data | ( | uarti2cspi2_t * | ctx, |
| uint8_t * | data_in, | ||
| uint8_t | len ) |
UART I2C SPI 2 write data function.
This function writes a block of data to the transmit buffer.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [in] | data_in | : Data to be written. |
| [in] | len | : Number of bytes to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uarti2cspi2_write_reg | ( | uarti2cspi2_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
UART I2C SPI 2 write register function.
This function writes a single byte of data to the selected register address.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data byte to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uarti2cspi2_write_regs | ( | uarti2cspi2_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
UART I2C SPI 2 write registers function.
This function writes a desired number of data bytes starting from the selected register address.
| [in] | ctx | : Click context object. See uarti2cspi2_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [in] | data_in | : Data to be written. |
| [in] | len | : Number of bytes to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.